<template>
  <div class="editCont">
    <div class="edt2">
      <!-- <img
        style="width: 29px; height: 25px; opacity: 0.5; cursor: pointer"
        src="../../assets/back.png"
      /> -->
      <span>企业信息</span>
    </div>
    <div class="hx"></div>
    <div class="contss">
      <div>
        <span class="jx"><span style="margin-left: 10px">基本信息</span></span>
      </div>
      <div class="fmor">
        <el-form
          :model="infos"
          size="mini"
          ref="sxedu"
          label-width="150px"
          label-position="right"
        >
          <el-row>
            <el-col :span="8">
              <el-form-item label="企业名称:">
                {{ infos.middleSignCode }}
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="统一社会信用代码:">
                {{ infos.creditCode }}
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="法人名称:">
                {{ infos.sss }}
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="所属地区:">
                {{ infos.area }}
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>

        <div>
          <div class="xtrz"></div>
          <div>
            <span class="jx2"
              ><span style="margin-left: 10px">额度授信</span></span
            >
          </div>
          <el-form
            :rules="rules"
            ref="sxedu"
            :model="sxedu"
            size="mini"
            label-width="150px"
            label-position="right"
          >
            <el-form-item label="额度:" prop="creditLimit">
              <el-input
                placeholder="请输入内容"
                v-model="sxedu.creditLimit"
                style="width: 221px"
              ></el-input>
              万元
            </el-form-item>

            <el-form-item label="额度期限:" required>
              <el-col :span="6">
                <el-form-item prop="creditStartTime">
                  <el-date-picker
                    v-model="sxedu.creditStartTime"
                    type="date"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col class="line" :span="1">——</el-col>
              <el-col :span="6">
                <el-form-item prop="creditEndTime">
                  <el-date-picker
                    v-model="sxedu.creditEndTime"
                    type="date"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
            </el-form-item>
          </el-form>
        </div>
        <div class="anniu222">
          <el-button type="primary" @click="queren(sxedu)">确认提交</el-button>
          <el-button type="primary" @click="kehusx">取消</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { creditAgree } from "@/api/leagues/app";
import { dateFormat } from "@/utils/date";
export default {
  name: "",
  data() {
    return {
      infos: {},
      sxedu: {
        creditLimit: "",
        creditStartTime: "",
        creditEndTime: "",
      },
      rules: {
        creditLimit: [
          {
            required: true,
            message: "请输入额度,只能输入数字",
            trigger: "blur",
          },
        ],
        creditStartTime: [
          {
            type: "date",
            required: true,
            message: "请选择日期",
            trigger: "change",
          },
        ],
        creditEndTime: [
          {
            type: "date",
            required: true,
            message: "请选择时间",
            trigger: "change",
          },
        ],
      },
    };
  },
  //方法集合
  created() {
    debugger
    this.infos = this.$route.query.item;
    this.sxedu.extraCreditApplyId = this.$route.query.extraCreditApplyId;
  },
  methods: {
    kehusx() {
      this.$router.go(-1);
    },
    queren() {
      this.$refs.sxedu.validate((valid) => {
        if (valid) {
      debugger
          creditAgree(this.sxedu).then((data) => {
            if (data.data.code == 1) {
              this.$message({
                message: data.data.msg,
              });
            }
          });
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    creditLimit() {},
  },
};
</script>
<style  scoped>
.edt2 {
  float: left;
  height: 24px;
  font-size: 25px;
  font-weight: bold;
  color: #051232;
  line-height: 54px;
  margin-left: 10px;
}
.edt1 {
  height: 24px;
  font-size: 25px;
  font-weight: bold;
  color: #051232;
  line-height: 54px;
  float: right;
  margin-right: 11px;
}
.jx {
  width: 2px;
  height: 20px;
  font-size: 18px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #051232;
  line-height: 100px;
  text-indent: 20px;
  border-left: 3px solid #0075ff;
  margin-left: 40px;
}
.neir {
  width: 300px;
  height: 15px;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #051232;
  line-height: 35px;
  margin-bottom: 30px;
}
.neir3 {
  width: 300px;
  height: 68px;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #051232;
  /* line-height: 35px;
margin-bottom: 30px; */
  margin-left: 100px;
  text-align: center;
}
.jx2 {
  width: 2px;
  height: 20px;
  font-size: 18px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #051232;
  line-height: 100px;
  text-indent: 20px;
  border-left: 3px solid #0075ff;
  margin-left: -47px;
}
.pj {
  height: 84px;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0px 1px 0px 0px #e6e6e6;
  display: flex;
  margin-left: 94px;
}
.fmor {
  position: relative;
  margin-left: 93px;
}
.editCont {
  width: 1200px;
  /* height: 890px; */
  background: #ffffff;
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.06);
  border-radius: 6px 6px 10px 10px;
  margin: 0 auto;
  position: relative;
  top: 50%;
}
.hx {
  width: 1200px;
  height: 54px;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0px 1px 0px 0px #e6e6e6;
}
.hx2 {
  width: 1200px;
  height: 54px;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0px 1px 0px 0px #e6e6e6;
  margin-top: 181px;
}
.lzp {
  margin-left: 10px;
}
.sx {
  width: 2px;
  height: 20px;
  background: #0075ff;
}
.sxzt {
  height: 17px;
  font-size: 18px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #051232;
  line-height: 10px;
  margin-left: 10px;
  margin-top: 5px;
}
.xtrz {
  width: 1100px;
  height: 84px;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0px 1px 0px 0px #e6e6e6;
  margin-left: -51px;
}
.tag {
  width: 63px;
  height: 26px;
  border: 2px solid #15be6b;
  position: relative;
  background-color: #15be6b;
  margin-left: 119px;
  margin-top: -52px;
}
.tag:before,
.tag:after {
  content: "";
  display: block;
  border-width: 7px;
  position: absolute;
  bottom: -16px;
  left: -1px;
  border-style: solid dashed dashed;
  border-color: #15be6b transparent transparent;
  font-size: 0;
  line-height: 0;
}
/* .tag:after {
  bottom: -33px;
  border-color: #fff transparent transparent;
} */
.tag span {
  width: 35px;
  height: 12px;
  font-size: 12px;
  font-weight: 400;
  color: #ffffff;
  line-height: 23px;
  padding-left: 7px;
}
.anniu222 {
  text-align: center;
  padding-bottom: 50px;
  padding-top: 68px;
}
.lfwz {
  height: 14px;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #586279;
  line-height: 36px;
  margin-top: 57px;
  margin-left: 85px;
}
.lfwzsp {
  display: inline-block;
  width: 80px;
  text-align: right;
}

.rgftu {
  float: right;
  display: inline-flex;
  margin-right: 225px;
  margin-top: -84px;
}
.jywz {
  height: 13px;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #586279;
  line-height: 56px;
  margin-left: 70px;
}
.jycts {
  display: flex;
  margin-top: 13px;
}
</style>
